package com.projles.ttd.dados;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class BDHelper extends SQLiteOpenHelper{

	
	private static final String NOME_DB = "dadosApp";

	private static final int VERSAO_DB = 1;

	
	private static final String SQL_CRIA_TABELA_QUESTOES = "CREATE TABLE questoes (_id INTEGER PRIMARY KEY AUTOINCREMENT, "
			+ "pergunta TEXT NOT NULL, " 
			+ "alternativaA  TEXT NOT NULL, " 
			+ "alternativaB  TEXT NOT NULL, "
			+ "alternativaC TEXT NOT NULL, "
			+ "alternativaD TEXT NOT NULL,"
			+ "resposta TEXT NOT NULL);";
	

	public BDHelper(Context context) {
		super(context, NOME_DB, null, VERSAO_DB);
	}

	@Override
	public void onCreate(SQLiteDatabase bd) {
		bd.execSQL(SQL_CRIA_TABELA_QUESTOES);
	}
	
	@Override
	public void onUpgrade(SQLiteDatabase bd, int oldVersion, int newVersion) {
		// TODO
	}

}
